<template>
    <div class="page register">
        <el-col :span="14" :xs="0"></el-col>
        <el-col :span="10" :xs="24">
            <el-form class="login-form">
                <h1>欢迎注册</h1>
                <el-form-item>
                    <el-input
                        type="text"
                        placeholder="请输入用户名"
                        size="large"
                        v-model.trim="username"
                        :prefix-icon="User"
                    />
                </el-form-item>
                <el-form-item>
                    <el-input
                        type="password"
                        placeholder="请输入密码"
                        size="large"
                        show-password
                        v-model.trim="password"
                        :prefix-icon="Lock"
                    />
                </el-form-item>
                <el-form-item>
                    <el-input
                        type="password"
                        placeholder="请再次输入密码"
                        size="large"
                        show-password
                        v-model.trim="repeatpassword"
                        :prefix-icon="Lock"
                    />
                </el-form-item>
                <el-form-item>
                    <el-button type="warning" class="btn-login" size="large"
                        >注册</el-button
                    >
                </el-form-item>
                <div class="login-tips">
                    还没有账号，<router-link to="/login">去登录</router-link>
                </div>
            </el-form>
        </el-col>
    </div>
</template>

<script setup>
import { User, Lock } from "@element-plus/icons-vue";
import { ref } from "vue";

const username = ref("");
const password = ref("");
const repeatpassword = ref("");
</script>

<style lang="scss" scoped>
.register {
    justify-content: center;
    align-items: center;
    background-image: url("../../assets/login-bg.jpg");
    background-repeat: no-repeat;
    background-size: cover;
    .login-form {
        background-color: rgba(0, 0, 0, 0.45);
        width: 60%;
        box-sizing: border-box;
        padding: 40px 40px 20px 40px;
        border-radius: 6px;
        h1 {
            font-size: 30px;
            color: #fff;
            margin-bottom: 20px;
        }
        .btn-login {
            width: 100%;
        }
        .login-tips {
            color: #fff;
            text-align: center;
            a {
                color: skyblue;
            }
        }
    }
}
</style>
